package com.qifenqian.turbot.module.adapter.statistics

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.qifenqian.turbot.R
import com.qifenqian.turbot.module.entity.response.statistic.SoldDishEntity
import kotlinx.android.synthetic.main.item_statistics_hot_dish.view.*

/**
 * @author H
 * @createTime 2018/12/24 17:57
 * @description
 * @see
 * @since
 */
class StatisticsHotDishAdapter(data: List<SoldDishEntity>?) : BaseQuickAdapter<SoldDishEntity, BaseViewHolder>(R.layout.item_statistics_hot_dish, data) {

    override fun convert(helper: BaseViewHolder, item: SoldDishEntity) {
        val view = helper.itemView
        view.tv_item_statistics_hot_dish_name.text = item.dishName
        view.tv_item_statistics_hot_dish_number.text = "12"
//                .setText(R.id.tv_item_statistics_hot_dish_number_change, if (item.numberChange > 0) {
//                    "+" + item.numberChange
//                } else {
//                    "-" + item.numberChange
//                })
//                .setImageResource(R.id.iv_item_statistics_hot_dish_number_change_symbol, if (item.numberChange > 0) {
//                    R.mipmap.ic_launcher
//                } else {
//                    R.mipmap.ic_launcher_round
//                })
//        Glide.with(mContext).load(item.imageUrl).into(helper.getView(R.id.iv_item_statistics_hot_dish_image))
    }
}
